#pragma once

#include<rtthread.h>
#include "sta_cmd.hpp"

#define FUNC_LIST_LEN 64

typedef cmd_line_group& (*handle_func_t)(const cmd_line_group& in);

class robot_func
{
public:
    robot_func(){
        dev_num = 0;
        fu_num = 0;
        func = RT_NULL;
    }
    robot_func(int dev, int fu, handle_func_t fc){
        dev_num = 0;
        fu_num = 0;
        func = fc;
    }

    handle_func_t func;
    uint8_t dev_num;
    uint8_t fu_num;
};

extern robot_func* func_list[];